package com.niuwa.p2p.service.gift.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.niuwa.p2p.dao.gift.PromotionGiftinfoMapper;
import com.niuwa.p2p.entity.gift.PromotionGiftinfo;
import com.niuwa.p2p.service.gift.GiftService;
@Service
public class GiftServiceImpl implements GiftService {

	@Resource
	private PromotionGiftinfoMapper promotionGiftinfoMapper;
	
	@Override
	public List<PromotionGiftinfo> searchGiftNotInPromotion(Integer promotionId) {
		Map map = new HashMap();
		map.put("notinPromotionId",promotionId);
		List<PromotionGiftinfo> selectByParam = promotionGiftinfoMapper.selectByParam(map);
		return selectByParam;
	}

	@Override
	public List<PromotionGiftinfo> searchGiftInPromotion(Integer promotionId) {
		Map map = new HashMap();
		map.put("inPromotionId",promotionId);
		List<PromotionGiftinfo> selectByParam = promotionGiftinfoMapper.selectByParam(map);
		return selectByParam;
	}

}
